<?php


inc_class("xsl");
inc_class("xml");
header('Content-type: text/xml');
//echo file_get_contents(XML_ROOT.'xsl2php.xml');
//echo file_get_contents(TEMPLATES_ROOT.'lang2code.xsl');
//echo file_get_contents(TEMPLATES_ROOT.'xsl2php.xsl');
//exit;
inc_class("pcre");

$page = new component();
//filedump($page->xml->GetDomXml("icq2html")->saveXML());
$ret = $page->xml->Transform($page->xml->Transform("xsl2php", "lang2code"), "code2text");
echo $ret->saveXML();
exit;
//filedump($ret->saveXML());
echo "<div style=\"background-color: #999999; font-weight: normal\">";
echo "<style>";
echo "code {
    font-family: 'Consolas';
    font-size: 11px;
}";
echo "</style>";
$script = highlight_string("<?php\n".$ret->getElementsByTagName("file")->item(0)->firstChild->data."\n?>", true);
//$script = pcre::replace(pcre::escape('<span style="color: #000000">'),'<span style="color: #000000; font-weight: bold">', $script);
echo $script;
echo "</div>";

?>